home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 2 / Mac Magazin and MacEasy Magazine CD - Issue 02.iso / Sharewarebibliothek / PowerMac / Rotate PPC ƒ / README < prev    next >
Text File  |  1994-07-11  |  2KB  |  88 lines

  1. RotatePPC 0.1d1
  2. ===============
  3.  
  4. This is a Power Macintosh only program that reads a set of
  5. 3-dimensional points and lines and plots them in a window.
  6. The image can then be rotated with the mouse in real time.
  7.  
  8. The provided source code demonstates a basic PPC C program
  9. that can handle the required apple events, set up and use
  10. an offscreen GWorld, get a file using StandardFile and
  11. read that file with standard C routines.
  12.  
  13. The resource file contains code that will put up an alert
  14. on non-PPC machines and quit.
  15.  
  16. The project file is for the Metrowerks PPC C DR/3 compiler.
  17.  
  18.  
  19. Rotating the Image
  20. ------------------
  21.  
  22. The image is rotated by holding the mouse button down and
  23. moving it around.
  24. left-right rotates about the z-axis
  25. up-down rotates around the x-axis
  26. The Rotate Slow menu rotates the image about the z-axis in
  27. one degree increments until the mouse is pressed.
  28. The Rotate Fast menu rotates the image about the z-axis in
  29. two degree increments until the mouse is pressed.
  30.  
  31.  
  32. Format of the Input File
  33. ------------------------
  34.  
  35. The input file consists of sets of four points on each line
  36.  
  37. x y z c
  38.  
  39. x = x coordinate of a point (real)
  40. y = y coordinate of a point (real)
  41. z = z coordinate of a point (real)
  42. c = color and/or drawing method (integer)
  43.  
  44. if (c = 0) move to the x,y,z point without drawing
  45. if (c > 0) draw a line to the x,y,z point from the current
  46.            position using color c
  47. if (c < 0) draw a dot at x,y,z using color -c
  48.  
  49. where
  50. if (c = 1) color is red
  51. if (c = 2) color is green
  52. if (c = 3) color is blue
  53. if (c > 3) color is white
  54.  
  55. eg
  56. 0.5 2.3 -1 0  # moves to point 0.5 2.3 -1 without drawing
  57. 3 5 6 2       # draws red line from 0.05 2.3 -1 to 3 5 6
  58. 5 -5 2 -3     # plots blue dot at 5 -5 2
  59.  
  60. The input file can be any text file. Only 4 numbers to a
  61. line and no extra text.
  62.  
  63. The points are scaled to fit in the window and rotation
  64. is about 0,0,0.
  65.  
  66.  
  67. Notes
  68. -----
  69.  
  70. A Power Macintosh 6100 can handle 500 input lines reasonably
  71. comfortably.
  72.  
  73. The executable is compiled for a maximum of 2500 input lines.
  74.  
  75. This program and the source are free and I take no responsibility
  76. if it kills your machine or drives you mad.
  77.  
  78. E-mail me if you find a use for it or come up with a killer
  79. set of points/lines. I am also interested in other methods for
  80. rotating 3d points (esp the trackball rotation).
  81.  
  82. ---
  83.  
  84. Enjoy
  85.  
  86. Craig Kloeden <craig@raru.adelaide.edu.au>
  87. 12 June 1994
  88.